#ifndef SLIDE_EFFECT_H_
#define SLIDE_EFFECT_H_

// INCLUDES //
#include "puzzle_effect.h"
//////////////

/**
* An effect that allows the player to slide puzzle pieces around.
* 
* @author dfoelber
**/
class SlideEffect : public PuzzleEffect
{
public:
	/**
	* Constructor
	* 
	* @param owner The owner to this effect
	**/
	SlideEffect(RegionEffectOwner* owner);
	
	/**
	* Virtual destructor
	**/
	virtual ~SlideEffect();
	
	/**
	* Notifies the effect to start.
	* 
	* Overridden from RegionEffect.
	**/
	virtual void OnStart();
	
	/**
	* Notifies the effect that the finish state of the puzzle region is finished.
	* 
	* Overridden from PuzzleEffect.
	**/
	virtual void OnFinishCompleted();
	
	/**
	* Asks the effect if it wants to freeze the active object and its association list.
	* 
	* Overridden from RegionEffect.
	* 
	* @return If the active object and association are to be frozen
	**/
	virtual bool FreezeActiveAndSimilar();
	
	/**
	* Input that can be used by the effect.
	* 
	* @param event The event
	* @return If the event was consumed
	**/
	virtual bool Input( SDL_Event event );
	
	/**
	* Notifies that the TimeRegion's countdown is complete.
	* 
	* Overridden from TimeRegionListener
	**/
	virtual void CountdownFinished();
	
private:
	/// Selected object
	Object*		selectedObject;
	/// A stored X coordinate
	int			oldX;
	/// A stored Y coordinate
	int			oldY;
	/// Selected object's X coordinate
	int			selectedX;
	/// Selected object's Y coordinate
	int			selectedY;
	/// Selected object's width
	int			selectedWidth;
	/// Selected object's height
	int			selectedHeight;
};

#endif /*SLIDE_EFFECT_H_*/
